<!--<page-header [title]="'jhipsterSampleApplicationApp.systemUser.home.createOrEditLabel'| translate">-->
<!--</page-header>-->
<page-bar></page-bar>
<nz-card [nzBordered]="false">
  <form nz-form (ngSubmit)="save()">
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="field_id" jhiTranslate="jhipsterSampleApplicationApp.systemUser.id">ID</nz-form-label>
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="number" name="id" id="field_id" [(ngModel)]="user!.id" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_login"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.login"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.login' | translate"
        >Login</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="text" name="login" id="field_login" [(ngModel)]="user!.login" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_password"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.password"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.password' | translate"
        >Password</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="text" name="password" id="field_password" [(ngModel)]="user!.password" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_firstName"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.firstName"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.firstName' | translate"
        >First Name</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="text" name="firstName" id="field_firstName" [(ngModel)]="user!.firstName" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_lastName"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.lastName"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.lastName' | translate"
        >Last Name</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="text" name="lastName" id="field_lastName" [(ngModel)]="user!.lastName" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_email"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.email"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.email' | translate"
        >Email</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="text" name="email" id="field_email" [(ngModel)]="user!.email" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_mobile"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.mobile"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.mobile' | translate"
        >Mobile</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="text" name="mobile" id="field_mobile" [(ngModel)]="user!.mobile" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_birthday"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.birthday"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.birthday' | translate"
        >Birthday</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <nz-date-picker id="field_birthday" name="birthday" [(ngModel)]="user!.birthday" nzShowTime></nz-date-picker>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_activated"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.activated"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.activated' | translate"
        >Activated</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <nz-switch [(ngModel)]="user!.activated" nzCheckedChildren="是" nzUnCheckedChildren="否"></nz-switch>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_langKey"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.langKey"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.langKey' | translate"
        >Lang Key</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="text" name="langKey" id="field_langKey" [(ngModel)]="user!.langKey" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_imageUrl"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.imageUrl"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.imageUrl' | translate"
        >Image Url</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="text" name="imageUrl" id="field_imageUrl" [(ngModel)]="user!.imageUrl" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_activationKey"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.activationKey"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.activationKey' | translate"
        >Activation Key</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="text" name="activationKey" id="field_activationKey" [(ngModel)]="user!.activationKey" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_resetKey"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.resetKey"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.resetKey' | translate"
        >Reset Key</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <input nz-input type="text" name="resetKey" id="field_resetKey" [(ngModel)]="user!.resetKey" />
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label
        [nzSm]="6"
        [nzXs]="24"
        nzFor="field_resetDate"
        jhiTranslate="jhipsterSampleApplicationApp.systemUser.resetDate"
        [ngbTooltip]="'jhipsterSampleApplicationApp.systemUser.help.resetDate' | translate"
        >Reset Date</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <nz-date-picker id="field_resetDate" name="resetDate" [(ngModel)]="user!.resetDate" nzShowTime></nz-date-picker>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="field_department" jhiTranslate="jhipsterSampleApplicationApp.systemUser.department"
        >Department</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <nz-tree-select
          style="width: 250px"
          id="field_department"
          [nzNodes]="departmentsCollectionNzTreeNodes"
          name="department"
          [(ngModel)]="user!.department"
        >
        </nz-tree-select>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="field_position" jhiTranslate="jhipsterSampleApplicationApp.systemUser.position"
        >Position</nz-form-label
      >
      <nz-form-control [nzSm]="17" [nzXs]="24">
        <nz-select style="width: 250px" id="field_position" name="position" [(ngModel)]="user!.position">
          <nz-option
            *ngFor="let positionOption of positionsCollection; trackBy: trackPositionById"
            [nzLabel]="positionOption!.name || null"
            [nzValue]="positionOption.id"
          ></nz-option>
        </nz-select>
      </nz-form-control>
    </nz-form-item>

    <div nz-row>
      <div nz-col [nzSpan]="24" style="text-align: center">
        <button type="submit" nz-button [nzType]="'primary'" [disabled]="isSaving">
          <span jhiTranslate="entity.action.save">Save</span>
        </button>
        <button type="button" nz-button (click)="previousState()"><span jhiTranslate="entity.action.cancel">Cancel</span></button>
      </div>
    </div>
  </form>
</nz-card>
